package 访问者模式

import "fmt"

type Sender interface {
	send(p2 *Player)
}

type Card struct {
	num int
	flower string
}



type Player struct {
	card *Card
}

func (p1 *Player)send(p2 *Player)  {
	fmt.Println("p1",p1.card)
	fmt.Println("p2",p2.card)
	p2.card = (*p1).card
	p1.card = nil
	fmt.Println("sending")
	fmt.Println("p1",p1.card)
	fmt.Println("p2",p2.card)
}

type CElement interface {
	GetCard(p2 *Player)
}



func (p1 *Player)GetCard(p2 *Player)  {
	p2.send(p1)
}
